package com.zjj.wangluo.lianxi.tcp04;

import java.io.IOException;
import java.net.Socket;

/**
 * @author zhoujunjie
 * @desc TODO
 * @date
 */
public class TCPClient {

    public static void main(String[] args) {
        System.out.println("-----------客户端----------");
        try {
            Socket socket = new Socket("127.0.0.1", 8888);

            //启动读线程
            new Thread(new ReadThread(socket)).start();
            //启动写线程
            new Thread(new WriteThread(socket)).start();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
